<html>

<head>
<meta name=标题 content="">
<meta name=关键词 content="">
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 15 (filtered)">
<style>
<!--
 /* Font Definitions */
@font-face
	{font-family:"Courier New";
	panose-1:2 7 3 9 2 2 5 2 4 4;}
@font-face
	{font-family:Times;
	panose-1:0 0 5 0 0 0 0 2 0 0;}
@font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:DengXian;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:"\@DengXian";}
@font-face
	{font-family:"Microsoft YaHei";
	panose-1:2 11 5 3 2 2 4 2 2 4;}
@font-face
	{font-family:Menlo;
	panose-1:2 11 6 9 3 8 4 2 2 4;}
@font-face
	{font-family:"\@Microsoft YaHei";}
 /* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:12.0pt;
	font-family:DengXian;}
code
	{font-family:Courier;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:21.0pt;
	font-size:12.0pt;
	font-family:DengXian;}
p.a, li.a, div.a
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	line-height:200%;
	font-size:12.0pt;
	font-family:"Microsoft YaHei";}
.MsoChpDefault
	{font-family:DengXian;}
 /* Page Definitions */
@page WordSection1
	{size:595.0pt 842.0pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;
	layout-grid:15.6pt;}
div.WordSection1
	{page:WordSection1;}
 /* List Definitions */
ol
	{margin-bottom:0cm;}
ul
	{margin-bottom:0cm;}
-->
</style>

</head>

<body lang=ZH-CN style='text-justify-trim:punctuation'>

<div class=WordSection1 style='layout-grid:15.6pt'>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-size:14.0pt;line-height:200%;font-family:"Microsoft YaHei"'>ip</span></b></p>

<p class=MsoNormal align=left style='margin-bottom:12.0pt;text-align:left;
text-indent:21.0pt;line-height:200%;text-autospace:none'><span lang=EN-US
style='font-family:"Microsoft YaHei";color:black;vertical-align:sub'>ip</span><span
style='font-family:"Microsoft YaHei";color:black;vertical-align:sub'>指令可以显示或操作路由、网路设备，设置路由策略和通道。</span></p>

<p class=MsoNormal align=left style='margin-bottom:12.0pt;text-align:left;
text-indent:21.0pt;line-height:200%;text-autospace:none'><span
style='font-family:"Microsoft YaHei";color:black;vertical-align:sub'>此命令的适用范围：<span
lang=EN-US>RedHat</span>、<span lang=EN-US>RHEL</span>、<span lang=EN-US>Ubuntu</span>、<span
lang=EN-US>CentOS</span>、<span lang=EN-US>SUSE</span>、<span lang=EN-US>openSUSE</span>、<span
lang=EN-US>Fedora</span>。</span></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>&nbsp;</span></b></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>1</span></b><b><span style='font-family:
"Microsoft YaHei"'>、语法</span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>ip  [</span></b><b><span
style='font-family:"Microsoft YaHei"'>选项<span lang=EN-US>]  OBJECT  COMMAND 
[help]</span></span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>OBJECT</span><span
style='font-family:"Microsoft YaHei"'>对象可以是：<span lang=EN-US>link</span>，网络设备；<span
lang=EN-US>addr</span>，设备的协议地址；<span lang=EN-US>route</span>，路由表；<span
lang=EN-US>rule</span>，策略；<span lang=EN-US>neigh</span>，<span lang=EN-US>arp</span>缓存；<span
lang=EN-US>tunnel</span>，<span lang=EN-US>ip</span>通道；<span lang=EN-US>maddr</span>，多播地址；<span
lang=EN-US>mroute</span>，多播路由</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>COMMAND</span><span
style='font-family:"Microsoft YaHei"'>是操作命令，不同的对象有不同的命令配置。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>link</span><span
style='font-family:"Microsoft YaHei"'>对象支持的命令：<span lang=EN-US>set</span>、<span
lang=EN-US>show</span>。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>addr</span><span
style='font-family:"Microsoft YaHei"'>对象支持的命令：<span lang=EN-US>add</span>、<span
lang=EN-US>del</span>、<span lang=EN-US>flush</span>、<span lang=EN-US>show</span>。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>route</span><span
style='font-family:"Microsoft YaHei"'>对象支持的命令：<span lang=EN-US>list</span>、<span
lang=EN-US>flush</span>、<span lang=EN-US>get</span>、<span lang=EN-US>add</span>、<span
lang=EN-US>del</span>、<span lang=EN-US>change</span>、<span lang=EN-US>append</span>、<span
lang=EN-US>replace</span>、<span lang=EN-US>monitor</span>。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>rule</span><span
style='font-family:"Microsoft YaHei"'>对象支持的命令：<span lang=EN-US>list</span>、<span
lang=EN-US>add</span>、<span lang=EN-US>del</span>、<span lang=EN-US>flush</span>。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>neigh</span><span
style='font-family:"Microsoft YaHei"'>对象支持的命令：<span lang=EN-US>add</span>、<span
lang=EN-US>del</span>、<span lang=EN-US>change</span>、<span lang=EN-US>replace</span>、<span
lang=EN-US>show</span>、<span lang=EN-US>flush</span>。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>tunnel</span><span
style='font-family:"Microsoft YaHei"'>对象支持的命令：<span lang=EN-US>add</span>、<span
lang=EN-US>change</span>、<span lang=EN-US>del</span>、<span lang=EN-US>show</span>。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>maddr</span><span
style='font-family:"Microsoft YaHei"'>支持的命令：<span lang=EN-US>add</span>、<span
lang=EN-US>del</span>。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>mroute</span><span
style='font-family:"Microsoft YaHei"'>支持的命令：<span lang=EN-US>show</span></span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>2</span></b><b><span style='font-family:
"Microsoft YaHei"'>、选项列表</span></b></p>

<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0 width="95%"
 style='width:95.0%;margin-left:24.1pt;border-collapse:collapse;border:none'>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  background:#E7E6E6;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>选项</span></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border:solid windowtext 1.0pt;
  border-left:none;background:#E7E6E6;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>说明</span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>-V | -Version</span></b></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>显示版本信息</span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>--help</span></b></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>显示帮助信息</span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>-s | -stats | -statistics</span></b></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>显示详细的信息</span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>-f | -family</span></b></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>指定协议类型</span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>-4</span></b></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>等同<span
  lang=EN-US>-family inet</span></span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>-6</span></b></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>等同<span
  lang=EN-US>-family inet6</span></span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>-0</span></b></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>等同<span
  lang=EN-US>-family link</span></span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>-o | -oneline</span></b></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>每条记录输出一行</span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>-r | -resove</span></b></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>使用系统名字解析<span
  lang=EN-US>DNS</span></span></p>
  </td>
 </tr>
</table>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>&nbsp;</span></b></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>3</span></b><b><span style='font-family:
"Microsoft YaHei"'>、<span lang=EN-US>ip link---</span>网络设备配置</span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>链路是一种网络设备，相应的命令显示和改变设备的状态。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>1</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip link set</span></b>，改变设备属性</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>dev</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NAME</u> (default)</span><span
style='font-family:"Microsoft YaHei"'>，<u><span lang=EN-US>NAME</span></u>指定要操作的网络设备。配置<span
lang=EN-US>SR-IOV</span>虚拟功能<span lang=EN-US>(VF)</span>设备时，此关键字应指定关联的物理功能<span
lang=EN-US>(PF)</span>设备。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>up</span></b><span
style='font-family:"Microsoft YaHei"'>，<b><span lang=EN-US>down</span></b>，改变设备的状态，开或者关。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>arp on</span></b><span
style='font-family:"Microsoft YaHei"'>，<b><span lang=EN-US>arp off</span></b>，更改设备的<span
lang=EN-US>NOARP</span>标志。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>multicast on</span></b><span
style='font-family:"Microsoft YaHei"'>，<b><span lang=EN-US>multicast off</span></b>，更改设备的<span
lang=EN-US>MULTICAST</span>标志。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>dynamic on</span></b><span
style='font-family:"Microsoft YaHei"'>，<b><span lang=EN-US>dynamic off</span></b>，更改设备的<span
lang=EN-US>DYNAMIC</span>标志。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>name</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NAME</u></span><span
style='font-family:"Microsoft YaHei"'>，更改设备的名字，如果设备正在运行或者已经有一个配置好的地址，那么操作无效。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>txqueuelen</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NUMBER</u></span><span
style='font-family:"Microsoft YaHei"'>，<b><span lang=EN-US>txqlen</span></b><span
lang=EN-US> <u>NUMBER</u></span>，更改设备发送队列的长度。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>mtu</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NUMBER</u></span><span
style='font-family:"Microsoft YaHei"'>，更改设备<span lang=EN-US>MTU</span>。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>address</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>LLADDRESS</u></span><span
style='font-family:"Microsoft YaHei"'>，更改接口的站点地址</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>broadcast</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>LLADDRESS</u></span><span
style='font-family:"Microsoft YaHei"'>，<b><span lang=EN-US>brd</span></b><span
lang=EN-US> <u>LLADDRESS</u></span>，<b><span lang=EN-US>peer</span></b><span
lang=EN-US> <u>LLADDRESS</u></span>，当接口为<span lang=EN-US>POINTOPOINT</span>时，更改链路层广播地址或对等地址。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>netns</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>PID</u></span><span
style='font-family:"Microsoft YaHei"'>，将设备移动到与进程<span lang=EN-US>PID</span>关联的网络命名空间</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>alias</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NAME</u></span><span
style='font-family:"Microsoft YaHei"'>，给设备一个符号名以便于参考</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>vf</span></b><span lang=EN-US
style='font-family:"Microsoft YaHei"'> <u>NUM</u></span><span style='font-family:
"Microsoft YaHei"'>，指定要配置的虚拟功能设备。必须使用<span lang=EN-US>dev</span>参数指定关联的<span
lang=EN-US>pf</span>设备。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>警告：如果请求更改多个参数，则在任何更改失败后立即中止<span
lang=EN-US>IP</span>。这是<span lang=EN-US>IP</span>能够将系统移动到不可预测状态的唯一情况。解决方案是避免使用一个<span
lang=EN-US>ip</span>链路集调用来更改多个参数。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>2</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip link show</span></b>，显示设备属性</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>dev</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NAME</u> (default)</span><span
style='font-family:"Microsoft YaHei"'>，<u><span lang=EN-US>NAME</span></u>指定要显示的网络设备。如果省略此参数，则列出所有设备。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>up</span></b><span
style='font-family:"Microsoft YaHei"'>，只显示运行的设备。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>4</span></b><b><span style='font-family:
"Microsoft YaHei"'>、<span lang=EN-US>ip address---</span>协议地址管理</span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>该地址是附加到网络设备上的协议<span lang=EN-US>(IP</span>或<span
lang=EN-US>IPv 6)</span>地址。每个设备必须至少有一个地址才能使用相应的协议。可以将几个不同的地址附加到一个设备上。这些地址不受歧视，因此别名一词不太适合它们，我们在本文件中也没有使用它。<b><span
lang=EN-US>ip addr</span></b>命令显示地址及其属性，添加新地址并删除旧地址。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>1</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip address add</span></b>，增加新的协议地址</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>dev</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NAME</u></span><span
style='font-family:"Microsoft YaHei"'>，要向其添加地址的设备的名称。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>local</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>ADDRESS</u> (default)</span><span
style='font-family:"Microsoft YaHei"'>，接口的地址。地址的格式取决于协议。它是一个用于<span lang=EN-US>IP</span>的虚线四边形和一系列十六进制半字，用冒号分隔用于<span
lang=EN-US>IPv 6</span>。地址后面可以是斜杠和十进制数，它们编码网络前缀长度。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>peer</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>ADDRESS</u></span><span
style='font-family:"Microsoft YaHei"'>，点对点接口的远程端点的地址。同样，地址后面可以是斜杠和十进制数，编码网络前缀长度。如果指定了对等地址，则本地地址不能具有前缀长度。网络前缀与对等端相关联，而不是与本地地址相关联。</span></p>

<p class=MsoNormal style='text-indent:21.0pt'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>broadcast</span></b><span lang=EN-US
style='font-family:"Microsoft YaHei"'> <u>ADDRESS</u></span><span
style='font-family:"Microsoft YaHei"'>，接口的广播地址。可以使用特殊符号<span lang=EN-US>“</span>和<span
lang=EN-US>”-“</span>代替广播地址。在这种情况下，通过设置<span lang=EN-US>/</span>重置接口前缀的主机位来导出广播地址。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>label</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NAME</u></span><span
style='font-family:"Microsoft YaHei"'>，每个地址都可以用标签字符串标记。为了保持与<span lang=EN-US>Linux2.0</span>网络别名的兼容性，此字符串必须与设备名称重合，或者必须以设备名后跟冒号作为前缀。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>scope</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>SCOPE_VALUE</u></span><span
style='font-family:"Microsoft YaHei"'>，地址有效的区域的范围。可用的作用域列在文件“<span lang=EN-US>/etc/iproute2/rt_scopes</span>“中。预定义的范围值是：</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅰ）<b><span lang=EN-US>global</span></b>，地址全局有效。</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅱ）<b><span lang=EN-US>site</span></b>，<span
lang=EN-US>(</span>仅<span lang=EN-US>IPv 6)</span>该地址为站点本地地址，即该地址在此站点内有效。</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅲ）<b><span lang=EN-US>link</span></b>，该地址是本地链接，即它仅在此设备上有效。</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅳ）<b><span lang=EN-US>host</span></b>，该地址仅在此主机内有效。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>2</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip address delete</span></b>，删除协议地址</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>Arguments</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>:</span><span lang=EN-US> </span><span
style='font-family:"Microsoft YaHei"'>与“<b><span lang=EN-US>ip addr add</span></b>“的参数一致。设备名称是必需的参数。其余的都是可选的。如果没有提供参数，则删除第一个地址。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>3</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip address show</span></b>，显示协议地址</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>dev</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NAME</u> (default)</span><span
style='font-family:"Microsoft YaHei"'>，设备名字</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>scope</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>SCOPE_VAL</u></span><span
style='font-family:"Microsoft YaHei"'>，仅列出具有此作用域的地址。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>to</span></b><span lang=EN-US
style='font-family:"Microsoft YaHei"'> <u>PREFIX</u></span><span
style='font-family:"Microsoft YaHei"'>，仅列出匹配<u><span lang=EN-US>PREFIX</span></u>的地址。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>label</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>PATTERN</u></span><span
style='font-family:"Microsoft YaHei"'>，只列出与模式匹配的标签的地址。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>dynamic</span></b><span
style='font-family:"Microsoft YaHei"'>，<u><span lang=EN-US>permanent</span></u>，仅<span
lang=EN-US>IPv 6)</span>仅列出由于无状态地址配置而安装的地址，或只列出永久<span lang=EN-US>(</span>非动态<span
lang=EN-US>)</span>地址。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>tentative</span></b><span
style='font-family:"Microsoft YaHei"'>，<span lang=EN-US>(</span>仅<span
lang=EN-US>IPv 6)</span>仅列出未通过重复地址检测的地址。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>deprecated</span></b><span
style='font-family:"Microsoft YaHei"'>，<span lang=EN-US>(</span>仅<span
lang=EN-US>IPv 6)</span>仅列出废弃地址</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>primary</span></b><span
style='font-family:"Microsoft YaHei"'>，<b><span lang=EN-US>secondary</span></b>，只列出主<span
lang=EN-US>(</span>或辅助<span lang=EN-US>)</span>地址。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>4</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip address flush</span></b>，刷新协议地址</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>此命令刷新由某些条件选择的协议地址。此命令具有与<span lang=EN-US>Show</span>相同的参数。不同之处在于，当不给出参数时，它不会运行。警告：这个命令<span
lang=EN-US>(</span>以及下面描述的其他刷新命令<span lang=EN-US>)</span>非常危险。如果你犯了一个错误，它不会原谅它，而是会残酷地清除所有的地址。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>使用<b><span lang=EN-US>-</span></b></span><b><span
lang=EN-US> </span></b><b><span lang=EN-US style='font-family:"Microsoft YaHei"'>statistics</span></b><span
style='font-family:"Microsoft YaHei"'>选项，命令变得详细。它打印出已删除地址的数量和为刷新地址列表而进行的轮次数。如果提供了两次此选项，则“<b><span
lang=EN-US>ip addr flush</span></b>“也会以上一小节描述的格式转储所有已删除的地址。</span></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>5</span></b><b><span style='font-family:
"Microsoft YaHei"'>、<span lang=EN-US>ip addrlabel---</span>协议地址标签管理</span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>IPv 6</span><span
style='font-family:"Microsoft YaHei"'>地址标签用于<span lang=EN-US>RFC 3484</span>中描述的地址选择。优先级由用户空间管理，只有标签存储在内核中。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>1</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip addrlabel add</span></b>，增加地址标签</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>prefix</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>PREFIX</u></span><span
style='font-family:"Microsoft YaHei"'>，<b><span lang=EN-US>dev</span></b><span
lang=EN-US> <u>DEV</u></span>，输出接口。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>label</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NUMBER</u></span><span
style='font-family:"Microsoft YaHei"'>，<span lang=EN-US>prefix</span>的标签，<span
lang=EN-US>0xffffffff</span>保留。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>2</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip addrlabel del</span></b>，删除地址标签</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>该命令删除内核中的一个地址标签条目。参数：与“<b><span
lang=EN-US>ip addrlabel add</span>“</b>的参数一致，但不需要标签。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>3</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip addrlabel list</span></b>，列出地址标签</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>显示地址标签的内容。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>4</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip addrlabel flush</span></b>，刷新地址标签</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>刷新地址标签的内容，并且不保存默认设置。</span></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>6</span></b><b><span style='font-family:
"Microsoft YaHei"'>、<span lang=EN-US>ip neighbour---</span>邻居<span lang=EN-US>/ARP</span>表管理</span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>邻居对象为共享相同链路的主机建立协议地址和链路层地址之间的绑定。邻接条目被组织成表。<span
lang=EN-US>IPv 4</span>邻居表的另一个名称是<span lang=EN-US>ARP</span>表。相应的命令显示邻居绑定及其属性，添加新的邻居项并删除旧条目。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>1</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip neighbour add</span></b>，增加邻居表</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>2</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip neighbour change</span></b>，改变已经存在的邻居表</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>3</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip neighbour replace</span></b>，增加一个表或者修改已经存在的表</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>这些命令创建新的邻居记录或更新现有记录。上面的三个命令使用方法如下<span
lang=EN-US>:</span></span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>to</span></b><span lang=EN-US
style='font-family:"Microsoft YaHei"'> <u>ADDRESS</u> (default)</span><span
style='font-family:"Microsoft YaHei"'>，邻居的协议地址。它要么是<span lang=EN-US>IPv4</span>，要么是<span
lang=EN-US>IPv6</span>地址。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>dev</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NAME</u></span><span
style='font-family:"Microsoft YaHei"'>，连接到邻居的接口。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>lladdr</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>LLADDRESS</u></span><span
style='font-family:"Microsoft YaHei"'>，邻居的链路层地址，可以是<span lang=EN-US>null</span>。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>nud</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NUD_STATE</u></span><span
style='font-family:"Microsoft YaHei"'>，邻居的状态，可以是下面的值：</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅰ）<b><span lang=EN-US>permanent</span></b>，邻居项永远有效，只能内管理员删除。</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅱ）<b><span lang=EN-US>noarp</span></b>，邻居项有效。将不会尝试验证此条目，但可以在其生存期届满时删除该条目。</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅲ）<b><span lang=EN-US>reachable</span></b>，邻居项在可达超时过期之前是有效的。</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅳ）<b><span lang=EN-US>stale</span></b>，邻居的进入是有效的，但却是可疑的。如果邻居状态有效且此命令未更改地址，则此选项不会更改邻居状态。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>4</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip neighbour delete</span></b>，删除邻居表</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>此命令使邻居项无效。这些参数与“<b><span lang=EN-US>ip
neigh add</span></b>“相同，只是将忽略<b><span lang=EN-US>lladdr</span></b>和<b><span
lang=EN-US>nud</span></b>。警告：试图删除或手动更改内核创建的<span lang=EN-US>noarp</span>条目可能会导致不可预测的行为。特别是，即使在<span
lang=EN-US>NOARP</span>接口上，如果地址是多播或广播的，内核也可以尝试解析此地址。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>5</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip neighbour show</span></b>，显示邻居表</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>to</span></b><span lang=EN-US
style='font-family:"Microsoft YaHei"'> <u>ADDRESS</u> (default)</span><span
style='font-family:"Microsoft YaHei"'>，选择要列出的邻居的前缀</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>dev</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NAME</u></span><span
style='font-family:"Microsoft YaHei"'>，只列出与此设备相连的邻居</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>unused</span></b><span
style='font-family:"Microsoft YaHei"'>，只列出当前未使用的邻居</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>nud</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NUD_STATE</u></span><span
style='font-family:"Microsoft YaHei"'>，只列出此状态中的相邻项。<u><span lang=EN-US>NUD_STATE</span></u>接受下面列出的值或特殊值<b><span
lang=EN-US>all</span></b>，这意味着所有状态。此选项可能发生不止一次。如果没有此选项，则<span lang=EN-US>IP</span>列出除<span
lang=EN-US>None</span>和<span lang=EN-US>noarp</span>以外的所有条目。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>6</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip neighbour flush</span></b>，刷新邻居表</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>此命令刷新相邻表，根据某些条件选择要刷新的条目。此命令具有与<b><span
lang=EN-US>show</span></b>相同的参数。不同之处在于，当不给出参数时，它不会运行，而要刷新的默认邻居状态不包括<b><span
lang=EN-US>permanent</span></b>和<b><span lang=EN-US>noarp</span></b>。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>7</span></b><b><span style='font-family:
"Microsoft YaHei"'>、<span lang=EN-US>ip route—</span>路由表管理</span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>操纵内核路由表中的路由条目保存其他网络节点的路径信息。路由类型可以是：</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅰ）<b><span lang=EN-US>unicast</span></b>，路由条目描述到路由前缀所涵盖的目的地的实际路径。</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅱ）<b><span lang=EN-US>unreachable</span></b>，这些目的地是无法到达的。丢弃数据包，生成不可访问的<span
lang=EN-US>ICMP</span>消息主机。本地发件人得到一个<span lang=EN-US>EHOSTUNEACH</span>错误。</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅲ）<b><span lang=EN-US>blackhole</span></b>，这些目的地是无法到达的。数据包被静默丢弃。本地发送者得到一个<span
lang=EN-US>EINVAL</span>错误</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅳ）<b><span lang=EN-US>prohibit</span></b>，这些目的地是无法到达的。丢弃数据包并生成<span
lang=EN-US>ICMP</span>消息通信，该<span lang=EN-US>ICMP</span>消息通信在管理上被禁止。本地发件人得到一个<span
lang=EN-US>EACCES</span>错误。</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅴ）<b><span lang=EN-US>local</span></b>，目的地分配给此主机。数据包被环回并在本地传送。</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅵ）<b><span lang=EN-US>broadcast</span></b>，目的地是广播地址。数据包作为链路广播发送。</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅶ）<b><span lang=EN-US>throw</span></b>，与策略规则一起使用的特殊控制路径。如果选择这样的路由，则将终止此表中的查找，假装没有找到路由。如果没有策略路由，则相当于路由表中没有路由。丢包并生成不可到达的<span
lang=EN-US>ICMP</span>消息网。本地发送者得到一个<span lang=EN-US>ENETUNEACH</span>错误。</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅷ）<b><span lang=EN-US>nat</span></b>，一条特殊的<span
lang=EN-US>NAT</span>路线。前缀覆盖的目的地被认为是虚拟地址<span lang=EN-US>(</span>或外部地址<span
lang=EN-US>)</span>，需要在转发之前转换为真实地址<span lang=EN-US>(</span>或内部地址<span
lang=EN-US>)</span>。选择要转换到的地址，并附带属性警告：<span lang=EN-US>Linux2.6</span>中不再支持路由<span
lang=EN-US>NAT</span>。</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅸ）<b><span lang=EN-US>via</span></b>，<b><span
lang=EN-US>anycast</span></b>，未实现目标是分配给此主机的任意广播地址。它们主要等同于本地地址，但有一个不同之处：当将这些地址用作任何数据包的源地址时，这些地址是无效的。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>multicast</span></b><span
style='font-family:"Microsoft YaHei"'>，用于多播路由的一种特殊类型。它不存在于普通路由表中。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>路由表：<span lang=EN-US>Linux-2.x</span>可以将路由打包到从<span
lang=EN-US>1</span>到<span lang=EN-US>255</span>范围内的数字标识的多个路由表中，或者根据文件<span
lang=EN-US>/etc/iucte 2/rt_tables</span>的名称，默认情况下，所有普通路由都插入主表<span lang=EN-US>(ID
254)</span>，内核只在计算路由时使用此表。实际上，另一个表总是存在的，这是不可见的，但更重要的是。它是本地表<span lang=EN-US>(ID
255)</span>。此表由本地地址和广播地址的路由组成。内核自动维护这个表，管理员通常不需要修改它，甚至不需要查看它。使用策略路由时，多个路由表进入游戏。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>1</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip route add</span></b>，增加路由</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>2</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip route change</span></b>，修改路由</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>3</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip route replace</span></b>，改变或者增加路由</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>to</span></b><span lang=EN-US
style='font-family:"Microsoft YaHei"'> <u>TYPE</u> <u>PREFIX</u> (default)</span><span
style='font-family:"Microsoft YaHei"'>，路由的目标前缀。如果省略类型，则<span lang=EN-US>IP</span>采用类型单播。以上列出了其他类型的值。前缀是一个<span
lang=EN-US>IP</span>或<span lang=EN-US>IPv 6</span>地址，后面有斜杠和前缀长度。如果前缀的长度丢失，则<span
lang=EN-US>IP</span>将采用全长主机路由<span lang=EN-US>.</span>还有一个特殊的前缀默认值<span
lang=EN-US>-</span>相当于“<b><span lang=EN-US>IP 0/0</span>“</b>或者”<b><span
lang=EN-US>to IPv6 ::/0</span>“</b>。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>tos</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>TOS</u></span><span
style='font-family:"Microsoft YaHei"'>，<b><span lang=EN-US>dsfield</span></b><span
lang=EN-US> <u>TOS</u></span>，服务类型<span lang=EN-US>(TOS)</span>密钥。该密钥没有关联的掩码，最长的匹配被理解为：首先，比较路由和数据包的<span
lang=EN-US>TOS</span>。如果它们不相等，那么数据包仍然可以匹配为零<span lang=EN-US>TOS</span>的路由。<span
lang=EN-US>TOS</span>要么是<span lang=EN-US>8</span>位十六进制数字，要么是“<b><span
lang=EN-US>/etc/iproute2/rt_dsfield</span></b>“中的标识符。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>metric</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NUMBER</u></span><span
style='font-family:"Microsoft YaHei"'>，<b><span lang=EN-US>preference</span></b><span
lang=EN-US> <u>NUMBER</u></span>，路由的首选值。<u><span lang=EN-US>NUMBER</span></u>是任意<span
lang=EN-US>32</span>位数。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>table</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>TABLEID</u></span><span
style='font-family:"Microsoft YaHei"'>，要添加此路由的表。<span lang=EN-US>TABLEID</span>可能是文件<b>“<span
lang=EN-US>/etc/iproute2/rt_tables</span>“</b>中的一个数字或字符串。如果省略此参数，则<span
lang=EN-US>IP</span>假定主表，但本地路由、广播路由和<span lang=EN-US>NAT</span>路由除外，默认情况下这些路由被放入本地表中。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>dev</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NAME</u></span><span
style='font-family:"Microsoft YaHei"'>，输出设备名字。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>via</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>ADDRESS</u></span><span
style='font-family:"Microsoft YaHei"'>，下一个路由器的地址。实际上，这个字段的意义取决于路由类型。对于普通单播路由，它要么是真正的下一跳路由器，要么是安装在<span
lang=EN-US>BSD</span>兼容模式下的直接路由，它可以是接口的本地地址。对于<span lang=EN-US>NAT</span>路由，它是已翻译的<span
lang=EN-US>IP</span>目的地块的第一个地址。</span></p>

<p class=MsoNormal style='text-indent:21.0pt'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>src</span></b><span lang=EN-US
style='font-family:"Microsoft YaHei"'> <u>ADDRESS</u></span><span
style='font-family:"Microsoft YaHei"'>，发送到路由前缀所涵盖的目的地时要首选的源地址。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>realm</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>REALMID</u></span><span
style='font-family:"Microsoft YaHei"'>，指定此路由的域。<u><span lang=EN-US>REALMID</span></u>可能是文件“<b><span
lang=EN-US>/etc/iproute2/rt_realms</span></b>“中的一个数字或字符串。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>mtu</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>MTU</u></span><span
style='font-family:"Microsoft YaHei"'>，<b><span lang=EN-US>mtu</span></b><span
lang=EN-US> <b>lock</b> <u>MTU</u></span>，沿着到达目的地的路径的<span lang=EN-US>MTU</span>。如果未使用修饰符锁，则由于路径<span
lang=EN-US>MTU</span>发现，内核可能更新<span lang=EN-US>MTU</span>。如果使用修饰符锁，则不会尝试路径<span
lang=EN-US>MTU</span>发现，所有数据包都将在<span lang=EN-US>IPv4</span>情况下不使用<span
lang=EN-US>DF</span>位发送，或者在<span lang=EN-US>IPv6</span>中碎片到<span lang=EN-US>MTU</span>。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>window</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NUMBER</u></span><span
style='font-family:"Microsoft YaHei"'>，<span lang=EN-US>TCP</span>向这些目的地广告的最大窗口，以字节为单位。它限制了<span
lang=EN-US>TCP</span>对等点允许发送给我们的最大数据突发。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>rtt</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>TIME</u></span><span
style='font-family:"Microsoft YaHei"'>，最初的<span lang=EN-US>RTT(‘</span>往返时间<span
lang=EN-US>’)</span>估计。如果没有指定后缀，则单元是直接传递给路由代码的原始值，以保持与以前版本的兼容性。否则，如果使用<span
lang=EN-US>s</span>、<span lang=EN-US>sec</span>或<span lang=EN-US>secs</span>后缀指定秒，使用<span
lang=EN-US>ms</span>、<span lang=EN-US>msec</span>或<span lang=EN-US>msecs</span>指定毫秒。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>rttvar</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>TIME</u> (2.3.15+ only)</span><span
style='font-family:"Microsoft YaHei"'>，初始<span lang=EN-US>RTT</span>方差估计。值与上述<span
lang=EN-US>RTT</span>指定的值相同。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>rto_min</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>TIME</u> (2.6.23+ only)</span><span
style='font-family:"Microsoft YaHei"'>，与此目标通信时要使用的最小<span lang=EN-US>TCP</span>重传超时。值与上述<span
lang=EN-US>RTT</span>指定的值相同。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>ssthresh</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NUMBER</u> (2.3.15+ only)</span><span
style='font-family:"Microsoft YaHei"'>，初始慢启动阈值的估计。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>cwnd</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NUMBER</u> (2.3.15+ only)</span><span
style='font-family:"Microsoft YaHei"'>，阻塞窗口的夹子。如果不使用锁标志，则忽略它</span></p>

<p class=MsoNormal style='text-indent:21.0pt'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>initcwnd</span></b><span lang=EN-US
style='font-family:"Microsoft YaHei"'> <u>NUMBER</u></span><span
style='font-family:"Microsoft YaHei"'>，<span lang=EN-US>TCP</span>连接的<span
lang=EN-US>MSS</span>中的最大初始拥塞窗口<span lang=EN-US>(CWND)</span>大小。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>initrwnd</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NUMBER</u> (2.6.33+ only)</span><span
style='font-family:"Microsoft YaHei"'>，连接到此目标的初始接收窗口大小。实际窗口大小是此值乘以连接的<span
lang=EN-US>MSS</span>。默认值为零，意味着使用慢速开始值。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>advmss</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NUMBER</u> (2.3.15+ only)</span><span
style='font-family:"Microsoft YaHei"'>，<span lang=EN-US>MSS(“</span>最大段大小<span
lang=EN-US>”)</span>在建立<span lang=EN-US>TCP</span>连接时向这些目的地做广告。如果未给出，<span
lang=EN-US>Linux</span>将使用从第一跳设备<span lang=EN-US>MTU</span>中计算出来的默认值。<span
lang=EN-US>(</span>如果到达这些目的地的路径是不对称的，则这种猜测可能是错误的。<span lang=EN-US>)</span></span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>reordering</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NUMBER</u> (2.3.15+ only)</span><span
style='font-family:"Microsoft YaHei"'>，到达此目标的路径上的最大重排序。如果未给出，<span lang=EN-US>Linux</span>将使用<span
lang=EN-US>sysctl</span>变量“<b><span lang=EN-US>net/ipv4/tcp_reordering</span></b>“所选择的值。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>nexthop</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NEXTHOP</u></span><span
style='font-family:"Microsoft YaHei"'>，多径路径的下一个。<span lang=EN-US>NEXTHOP</span>是一个复杂的值，其语法类似于顶级参数列表：</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅰ）<b><span lang=EN-US>via</span></b><span
lang=EN-US> <u>ADDRESS</u></span>，下一个路由器。</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅱ）<b><span lang=EN-US>dev</span></b><span
lang=EN-US> <u>NAME</u></span>，输出设备</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅲ）<b><span lang=EN-US>weight</span></b><span
lang=EN-US> <u>NUMBER</u></span>，是反映其相对带宽或质量的多径路由的此元素的权重。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>scope</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>SCOPE_VAL</u></span><span
style='font-family:"Microsoft YaHei"'>，路由前缀所涵盖的目的地的范围。<u><span lang=EN-US>SCOPE_VAL</span></u>可以是文件“<b><span
lang=EN-US>/etc/iproute2/rt_scopes</span></b>“中的一个数字或字符串。如果省略此参数，则<span
lang=EN-US>IP</span>假定所有网关单播路由的作用域全局、直接单播和广播路由的范围链接以及本地路由的范围主机。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>protocol</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>RTPROTO</u></span><span
style='font-family:"Microsoft YaHei"'>，此路由的路由协议标识符。<span lang=EN-US>RTPROTO</span>可以是文件“<b><span
lang=EN-US>/etc/iproute2/rt_protos</span></b>“中的一个数字或字符串。如果未给出路由协议<span
lang=EN-US>ID</span>，则<span lang=EN-US>IP</span>假定协议启动<span lang=EN-US>(</span>即假定路由是由不了解他们正在做的事情的人添加的<span
lang=EN-US>)</span>。一些协议值有固定的解释：</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅰ）<b><span lang=EN-US>redirect</span></b>，该路由是由于<span
lang=EN-US>icmp</span>重定向而安装的。</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅱ）<b><span lang=EN-US>kernel</span></b>，该路由是由内核在自动配置期间安装的。</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅲ）<b><span lang=EN-US>boot</span></b>，该路由是在启动过程中安装的。如果路由守护进程启动，它将清除所有这些守护进程。</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅳ）<b><span lang=EN-US>static</span></b>，管理员安装了该路由以覆盖动态路由。路由守护进程将尊重它们，甚至可能会向其对等方发布广告。</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅴ）<b><span lang=EN-US>ra</span></b>，路由是由路由器发现协议安装的。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>onlink</span></b><span
style='font-family:"Microsoft YaHei"'>，假装<span lang=EN-US>Nextthop</span>直接连接到此链接，即使它不匹配任何接口前缀。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>equalize</span></b><span
style='font-family:"Microsoft YaHei"'>，允许在多径路由上逐包随机化。如果没有这个修饰符，路由将被冻结到一个选定的下一个，这样负载拆分将只发生在每个流基上。只有当内核被修补时，均衡化才能工作。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>4</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip route delete</span></b>，删除路由</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>“<b><span lang=EN-US>ip route del</span></b>“与”<b><span
lang=EN-US>ip route add</span></b>“具有相同的参数，但它们的语义略有不同。键值<span lang=EN-US>(to</span>、<span
lang=EN-US>tos</span>、首选项和表<span lang=EN-US>)</span>选择要删除的路由。如果存在可选属性，则<span
lang=EN-US>IP</span>验证它们是否与要删除的路由的属性一致。如果没有找到具有给定密钥和属性的路由，则”<b><span
lang=EN-US>ip route del</span></b>“将失败</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>5</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip route show</span></b>，显示路由</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>to</span></b><span lang=EN-US
style='font-family:"Microsoft YaHei"'> <u>SELECTOR</u> (default)</span><span
style='font-family:"Microsoft YaHei"'>，仅从给定的目的地范围中选择路由。<u><span lang=EN-US>SELECTOR</span></u>由一个可选修饰符<span
lang=EN-US>(<b>root</b></span>、<b><span lang=EN-US>match</span></b>、<b><span
lang=EN-US>exact</span></b><span lang=EN-US>)</span>和一个前缀组成。<span lang=EN-US>root</span>选择前缀不小于<span
lang=EN-US>PREFIX</span>的路由。例如，“<b><span lang=EN-US>root  <u>0/0</u></span></b><span
lang=EN-US> </span>“选择整个路由表。<span lang=EN-US>match</span>选择前缀长度不超过<span
lang=EN-US>PREFIX</span>的路由。例如，”<b><span lang=EN-US>match  <u>10.0/16</u></span></b>“选择<u><span
lang=EN-US>10.0/16</span></u>、<u><span lang=EN-US>10/8</span></u>和<u><span
lang=EN-US>0/0</span></u>，但未选择<u><span lang=EN-US>10.1/16</span></u>和<u><span
lang=EN-US>10.0.0/24</span></u>。<span lang=EN-US>exact(</span>或仅仅前缀<span
lang=EN-US>)</span>选择具有此前缀的路由。如果这两个选项都没有出现，则<span lang=EN-US>IP</span>假设为根<span
lang=EN-US>0/0</span>，即它列出了整个表。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>tos</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>TOS</u></span><span
style='font-family:"Microsoft YaHei"'>，只选择具有给定<span lang=EN-US>tos</span>的路由。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>table</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>TABLEID</u></span><span
style='font-family:"Microsoft YaHei"'>，显示此表中的路线。默认设置是显示<span lang=EN-US>tablemain</span>。<span
lang=EN-US>TABLEID</span>可以是实表的<span lang=EN-US>ID</span>，也可以是特殊值之一：</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅰ）<b><span lang=EN-US>all</span></b>，列出所有的表。</span></p>

<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt;line-height:
200%'><span style='font-family:"Microsoft YaHei"'>Ⅱ）<b><span lang=EN-US>cache</span></b>，备份路由缓存。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>cloned</span></b><span
style='font-family:"Microsoft YaHei"'>，<b><span lang=EN-US>cached</span></b>，列出克隆的路由，即由于某些路由属性<span
lang=EN-US>(F.E)</span>而从其他路由动态分叉的路由。<span lang=EN-US>(MTU)</span>已更新。实际上，它等同于“<b><span
lang=EN-US>table cache</span></b>“。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>from</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>SELECTOR</u></span><span
style='font-family:"Microsoft YaHei"'>，语法与<b><span lang=EN-US>to</span></b>相同，但它绑定源地址范围而不是目的地。请注意，<span
lang=EN-US>FROM</span>选项仅适用于克隆路由。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>protocol</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>RTPROTO</u></span><span
style='font-family:"Microsoft YaHei"'>，仅列出此路由的协议。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>scope</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>SCOPE_VAL</u></span><span
style='font-family:"Microsoft YaHei"'>，仅列出具有此范围的路由</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>type</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>TYPE</u></span><span
style='font-family:"Microsoft YaHei"'>，只列出此类型的路由。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>dev</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NAME</u></span><span
style='font-family:"Microsoft YaHei"'>，只列出经过此设备的路由</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>via</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>PREFIX</u></span><span
style='font-family:"Microsoft YaHei"'>，只列出通过前缀选择的下一个路由器的路由</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>src</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>PREFIX</u></span><span
style='font-family:"Microsoft YaHei"'>，只列出由前缀选择的首选源地址的路由。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>realm</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>REALMID</u></span><span
style='font-family:"Microsoft YaHei"'>，<b><span lang=EN-US>realms</span></b><span
lang=EN-US> <u>FROMREALM</u>/<u>TOREALM</u></span>，只列出这些领域的路由。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>6</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip route flush</span></b>，刷新路由表</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>此命令刷新由某些标准选择的路由，参数具有与“<b><span
lang=EN-US>ip route show</span></b>“的参数相同的语法和语义，但是路由表没有列出，而是被清除。唯一的区别是默认操作：显示转储所有<span
lang=EN-US>IP</span>主路由表，但刷新打印助手页。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>使用“<b><span lang=EN-US>-statistics</span></b>“选项，命令变得详细。它打印出已删除路由的数目和刷新路由表的轮数。如果该选项被给予两次，<span
lang=EN-US>IP</span>路由刷新也会以上一小节描述的格式转储所有已删除的路由。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>7</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip route get</span></b>，获取一个单独的路由</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>此命令获取一条到达目标的路由，并按照内核所看到的那样打印其内容。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>to</span></b><span lang=EN-US
style='font-family:"Microsoft YaHei"'> <u>ADDRESS</u> (default)</span><span
style='font-family:"Microsoft YaHei"'>，目标地址。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>from</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>ADDRESS</u></span><span
style='font-family:"Microsoft YaHei"'>，源地址。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>tos</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>TOS</u></span><span
style='font-family:"Microsoft YaHei"'>，<b><span lang=EN-US>dsfield</span></b><span
lang=EN-US> <u>TOS</u></span>，服务类型。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>iif</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NAME</u></span><span
style='font-family:"Microsoft YaHei"'>，预期将从该包到达的设备。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>oif</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NAME</u></span><span
style='font-family:"Microsoft YaHei"'>，强制将此数据包路由的输出设备。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>connected</span></b><span
style='font-family:"Microsoft YaHei"'>，如果没有提供源地址<span lang=EN-US>(</span>选项从<span
lang=EN-US>)</span>，则重新查找从第一次查找中接收到的源设置为首选地址的路由。如果使用策略路由，则可能是不同的路由。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>请注意，此操作不等同于“<b><span lang=EN-US>ip route
show</span></b>“。<b><span lang=EN-US>show</span></b>显示现有路线。如果必要的话，<b><span
lang=EN-US>get</span></b>解决它们并创建新的克隆。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>8</span></b><b><span style='font-family:
"Microsoft YaHei"'>、<span lang=EN-US>ip rule---</span>路由策略数据库管理</span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>rule</span><span
style='font-family:"Microsoft YaHei"'>规则在路由策略数据库中控制路由选择算法。<span lang=EN-US>Internet</span>中使用的经典路由算法只根据数据包的目的地地址<span
lang=EN-US>(</span>理论上，而不是实际中的<span lang=EN-US>TOS</span>字段<span lang=EN-US>)</span>进行路由决策。在某些情况下，我们希望通过不同的方式路由数据包，这不仅取决于目的地地址，还取决于其他数据包字段：源地址、<span
lang=EN-US>IP</span>协议、传输协议端口，甚至包有效负载。此任务称为<span lang=EN-US>“</span>策略路由<span
lang=EN-US>”</span>。为了解决这一问题，传统的基于目标的路由表按照最长的匹配规则排序，被替换为<span lang=EN-US>“</span>路由策略数据库<span
lang=EN-US>”(RPDB)</span>，该数据库通过执行一组规则来选择路由。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>每个策略路由规则由一个选择器和一个动作谓词组成。<span lang=EN-US>RPDB</span>按照增加优先级的顺序进行扫描。每个规则的选择器应用于<span
lang=EN-US>{</span>源地址、目标地址、传入接口、<span lang=EN-US>tos</span>、<span lang=EN-US>fwmark}</span>，如果选择器与数据包匹配，则执行操作。动作谓词可能会成功返回。在这种情况下，它将给出路由或故障指示，并终止<span
lang=EN-US>RPDB</span>查找。否则，<span lang=EN-US>RPDB</span>程序将继续执行下一条规则。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>语义上，自然动作是选择下一个和输出设备。在启动时，内核配置由三条规则组成的默认<span
lang=EN-US>rpdb</span>：</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>Ⅰ）<span lang=EN-US>Priority: 0</span>。<span
lang=EN-US>Selector</span>：匹配任何内容，<span lang=EN-US>Action</span>：查找本地路由表<span
lang=EN-US>(ID 255)</span>。本地表是包含本地地址和广播地址的高优先级控制路由的特殊路由表。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>Ⅱ）<span lang=EN-US>Priority: 32766</span>。<span
lang=EN-US>Selector</span>：匹配任何内容，<span lang=EN-US>Action</span>：查找路由表主<span
lang=EN-US>(ID 254)</span>。主表是包含所有非策略路由的普通路由表<span lang=EN-US>.</span>管理员可以删除和<span
lang=EN-US>/</span>或用其他规则重写此规则。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>Ⅲ）<span lang=EN-US>Priority: 32767</span>。<span
lang=EN-US>Selector</span>：匹配任何内容，<span lang=EN-US>Action</span>：查找路由表默认值<span
lang=EN-US>(ID 253)</span>。默认表为空。如果没有先前的默认规则选择数据包，则保留用于某些后处理。这一规则也可以删除。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>RPDB</span></b><span
style='font-family:"Microsoft YaHei"'>可能包含以下类型的规则：</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>Ⅰ）<b><span lang=EN-US>unicast</span>，该规则规定返回在规则引用的路由表中找到的路由。</b></span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>Ⅱ）<b><span lang=EN-US>blackhole</span></b>，这条规则规定要悄悄丢弃数据包。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>Ⅲ）<b><span lang=EN-US>unreachable</span></b>，该规则规定生成<span
lang=EN-US>“</span>网络不可达<span lang=EN-US>”</span>错误。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>Ⅳ）<b><span lang=EN-US>prohibit</span></b>，该规则规定产生<span
lang=EN-US>“</span>在行政上禁止通信<span lang=EN-US>”</span>错误。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>Ⅴ）<b><span lang=EN-US>nat</span></b>，该规则规定将<span
lang=EN-US>ip</span>数据包的源地址转换为其他值。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>1</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip rule add</span></b>，增加规则。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>2</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip rule delete</span></b>，删除规则。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>type</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>TYPE</u> (default)</span><span
style='font-family:"Microsoft YaHei"'>，这个规则的类型</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>from</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>PREFIX</u></span><span
style='font-family:"Microsoft YaHei"'>，选择要匹配的源前缀</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>to</span></b><span lang=EN-US
style='font-family:"Microsoft YaHei"'> <u>PREFIX</u></span><span
style='font-family:"Microsoft YaHei"'>，选择要匹配的目标前缀</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>iif</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NAME</u></span><span
style='font-family:"Microsoft YaHei"'>，选择要匹配的传入设备。如果接口是回送的，则该规则只匹配来自此主机的数据包。这意味着您可以为转发包和本地数据包创建单独的路由表，从而完全隔离它们。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>tos</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>TOS</u></span><span
style='font-family:"Microsoft YaHei"'>，<b><span lang=EN-US>dsfield</span></b><span
lang=EN-US> <u>TOS</u></span>，选择要匹配的<span lang=EN-US>TOS</span>值。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>fwmark</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>MARK</u></span><span
style='font-family:"Microsoft YaHei"'>，选择要匹配的<span lang=EN-US>fwmark</span>值。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>priority</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>PREFERENCE</u></span><span
style='font-family:"Microsoft YaHei"'>，这条规则的优先级。每个规则都应该有一个显式设置的唯一优先级值。选项、偏好和顺序是优先级的同义词。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>table</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>TABLEID</u></span><span
style='font-family:"Microsoft YaHei"'>，如果规则选择器匹配，则查找路由表标识符。还可以使用查找而不是表。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>realms</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>FROM/TO</u></span><span
style='font-family:"Microsoft YaHei"'>，规则匹配和路由表查找成功时要选择的区域。只有当路由没有选择任何领域时，才使用要使用的领域。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>nat</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>ADDRESS</u></span><span
style='font-family:"Microsoft YaHei"'>，要翻译的<span lang=EN-US>IP</span>地址块的基<span
lang=EN-US>(</span>用于源地址<span lang=EN-US>)</span>。该地址可以是<span lang=EN-US>NAT</span>地址块的开始<span
lang=EN-US>(</span>由<span lang=EN-US>NAT</span>路由选择<span lang=EN-US>)</span>，也可以是本地主机地址<span
lang=EN-US>(</span>甚至为零<span lang=EN-US>)</span>。在最后一种情况下，路由器不会翻译数据包，而是将它们伪装成这个地址。使用<span
lang=EN-US>map-to</span>而不是<span lang=EN-US>nat</span>意味着同样的事情。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>3</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip rule flush</span></b>，刷新规则，还转储所有已删除的规则。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>没有参数。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>4</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip rule show</span></b>，显示规则</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>没有参数。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>9</span></b><b><span style='font-family:
"Microsoft YaHei"'>、<span lang=EN-US>ip maddress---</span>多播地址管理</span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>1</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip maddress show</span></b>，显示多播地址</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>dev</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NAME</u> (default)</span><span
style='font-family:"Microsoft YaHei"'>，设备名字</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>2</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip maddress add</span></b>，增加多播地址</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>3</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip maddress delete</span></b>，删除多播地址</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>这些命令附加<span lang=EN-US>/</span>分离一个静态链路层多播地址，以便在接口上侦听。请注意，不可能静态地加入协议多播组。此命令仅管理链接层地址</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>address</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>LLADDRESS</u> (default)</span><span
style='font-family:"Microsoft YaHei"'>，链路层多播地址。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>dev</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NAME</u></span><span
style='font-family:"Microsoft YaHei"'>，加入<span lang=EN-US>/</span>删除多播地址的设备</span></p>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>10</span></b><b><span style='font-family:
"Microsoft YaHei"'>、<span lang=EN-US>ip mroute---</span>多播路由缓存管理</span></b></p>

<p class=MsoNormal align=left style='text-align:left;text-indent:21.0pt;
line-height:200%'><span lang=EN-US style='font-family:"Microsoft YaHei"'>mroute</span><span
style='font-family:"Microsoft YaHei"'>对象是由用户级<span lang=EN-US>mrouting</span>守护进程创建的多播路由缓存条目。由于组播路由引擎当前接口的局限性，无法对多播路由对象进行管理更改，因此只能显示对象</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>ip mroute show</span></b><span
style='font-family:"Microsoft YaHei"'>，列出<span lang=EN-US>mroute</span>缓存项</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>to</span></b><span lang=EN-US
style='font-family:"Microsoft YaHei"'> <u>PREFIX</u> (default)</span><span
style='font-family:"Microsoft YaHei"'>，选择要列出的目标多播地址的前缀。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>iif</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NAME</u></span><span
style='font-family:"Microsoft YaHei"'>，接收多播数据包的接口。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>from</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>PREFIX</u></span><span
style='font-family:"Microsoft YaHei"'>，选择多播路由的<span lang=EN-US>IP</span>源地址的前缀</span></p>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>11</span></b><b><span style='font-family:
"Microsoft YaHei"'>、<span lang=EN-US>ip tunnel---</span>通道配置</span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>tunnel</span></b><span
style='font-family:"Microsoft YaHei"'>对象是隧道，它将数据包封装在<span lang=EN-US>IP</span>包中，然后通过<span
lang=EN-US>IP</span>基础结构发送。加密<span lang=EN-US>(</span>或外部<span lang=EN-US>)</span>地址族由“<span
lang=EN-US>-f</span>“选项指定。默认的是<span lang=EN-US>ipv4</span>。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>1</span><span
style='font-family:"Microsoft YaHei"'>）<span lang=EN-US>ip tunnel add</span>，增加一个新隧道</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>2</span><span
style='font-family:"Microsoft YaHei"'>）<span lang=EN-US>ip tunnel change</span>，修改一个已经存在的隧道</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>3</span><span
style='font-family:"Microsoft YaHei"'>）<span lang=EN-US>ip tunnel delete</span>，删除隧道</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>name</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NAME</u> (default)</span><span
style='font-family:"Microsoft YaHei"'>，隧道设备名字。 </span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>mode</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>MODE</u></span><span
style='font-family:"Microsoft YaHei"'>，设置隧道模式。可用的模式取决于封装地址系列。<span lang=EN-US>IPv
4</span>封装可用的模式：<span lang=EN-US>ipip</span>、<span lang=EN-US>SIT</span>、<span
lang=EN-US>isatap</span>和<span lang=EN-US>grep</span>；<span lang=EN-US>IPv6</span>封装的模式：<span
lang=EN-US>ip6ip6</span>、<span lang=EN-US>ipip6</span>和<span lang=EN-US>any</span>。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>remote</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>ADDRESS</u></span><span
style='font-family:"Microsoft YaHei"'>，设置隧道的远程端点</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>local</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>ADDRESS</u></span><span
style='font-family:"Microsoft YaHei"'>，设置隧道数据包的固定本地地址。它必须是此主机的另一个接口上的地址。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>ttl</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>N</u></span><span
style='font-family:"Microsoft YaHei"'>，在隧道化的数据包上设置固定的<span lang=EN-US>TTL N</span>。<span
lang=EN-US>N</span>是介于<span lang=EN-US>1-255</span>范围内的一个数字<span lang=EN-US>.0</span>是一个特殊值，意味着数据包继承<span
lang=EN-US>TTL</span>值。<span lang=EN-US>IPv 4</span>隧道的默认值是：<span lang=EN-US>Inherence</span>。<span
lang=EN-US>IPv6</span>隧道的默认值是：<span lang=EN-US>64</span>。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>tos</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>T</u></span><span
style='font-family:"Microsoft YaHei"'>，<b><span lang=EN-US>dsfield</span></b><span
lang=EN-US> <u>T</u></span>，<b><span lang=EN-US>tclass</span></b><span
lang=EN-US> <u>T</u></span>，在隧道数据包上设置固定的<span lang=EN-US>TOS(</span>或<span
lang=EN-US>IPv 6</span>中的流量类<span lang=EN-US>)T</span>。默认值是：<span lang=EN-US>inherit</span>。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>dev</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> NAME</span><span
style='font-family:"Microsoft YaHei"'>，将隧道绑定到设备名称，以便隧道数据包只能通过此设备路由，并且在到达端点的路由发生更改时无法逃逸到另一个设备。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>nopmtudisc</span></b><span
style='font-family:"Microsoft YaHei"'>，禁用此隧道上的路径<span lang=EN-US>MTU</span>发现。默认情况下启用它。请注意，固定的<span
lang=EN-US>ttl</span>与此选项不兼容：使用固定的<span lang=EN-US>ttl</span>进行隧道操作总是会使<span
lang=EN-US>pmtu</span>发现。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>key </span></b><u><span
lang=EN-US style='font-family:"Microsoft YaHei"'>K</span></u><b><span
style='font-family:"Microsoft YaHei"'>，<span lang=EN-US>ikey </span></span></b><u><span
lang=EN-US style='font-family:"Microsoft YaHei"'>K</span></u><b><span
style='font-family:"Microsoft YaHei"'>，<span lang=EN-US>okey </span></span></b><u><span
lang=EN-US style='font-family:"Microsoft YaHei"'>K</span></u><span
style='font-family:"Microsoft YaHei"'>，<span lang=EN-US>(</span>只有<span
lang=EN-US>GRE</span>隧道<span lang=EN-US>)</span>使用键控<span lang=EN-US>GRE</span>与密钥<span
lang=EN-US>K</span>，<span lang=EN-US>K</span>要么是一个数字或一个类似<span lang=EN-US>IP</span>地址的虚线四边形。<span
lang=EN-US>key</span>参数设置在两个方向上使用的键。<span lang=EN-US>ikey</span>和<span
lang=EN-US>okey</span>参数为输入和输出设置不同的键。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>csum, icsum, ocsum</span></b><span
style='font-family:"Microsoft YaHei"'>，<span lang=EN-US>(</span>只有<span
lang=EN-US>GRE</span>隧道<span lang=EN-US>)</span>生成<span lang=EN-US>/</span>要求隧道数据包的校验和。<b><span
lang=EN-US>ocsum</span></b>标志计算传出数据包的校验和。<b><span lang=EN-US>icsum</span></b>标志要求所有输入数据包都具有正确的校验和。<b><span
lang=EN-US>csum</span></b>标志等效于组合<b><span lang=EN-US>icsum ocsum</span></b>。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>seq, iseq, oseq</span></b><span
style='font-family:"Microsoft YaHei"'>，<span lang=EN-US>(</span>只有<span
lang=EN-US>GRE</span>隧道<span lang=EN-US>)</span>序列化数据包。<b><span lang=EN-US>oseq</span></b>标志允许对传出数据包进行排序。<b><span
lang=EN-US>iseq</span></b>标志要求对所有输入数据包进行序列化。<span lang=EN-US>seq</span>标志等效于<b><span
lang=EN-US>iseq oseq</span></b>组合。这不是工作。不要用它</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>dscp</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <b>inherit</b></span><span
style='font-family:"Microsoft YaHei"'>，<span lang=EN-US>(</span>只有<span
lang=EN-US>IPv 6</span>隧道<span lang=EN-US>)</span>在内部和外部报头之间继承<span lang=EN-US>DS</span>字段</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>encaplim</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>ELIM</u></span><span
style='font-family:"Microsoft YaHei"'>，设置固定的封装限制。缺省值为<span lang=EN-US>4</span></span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>flowlabel</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>FLOWLABEL</u></span><span
style='font-family:"Microsoft YaHei"'>，<span lang=EN-US>(</span>只有<span
lang=EN-US>IPv 6</span>隧道<span lang=EN-US>)</span>设置固定的流标签。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>4</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip tunnel prl</span></b>，潜在路由器列表<span
lang=EN-US>(</span>只有<span lang=EN-US>ISATAP)</span></span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>dev</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>NAME</u></span><span
style='font-family:"Microsoft YaHei"'>，</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>prl-default </span></b><u><span
lang=EN-US style='font-family:"Microsoft YaHei"'>ADDR</span></u><span
style='font-family:"Microsoft YaHei"'>，</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>prl-nodefault</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>ADDR</u></span><span
style='font-family:"Microsoft YaHei"'>，</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>prl-delete</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>ADDR</u></span><span
style='font-family:"Microsoft YaHei"'>，</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>添加或删除<u><span lang=EN-US>addr</span></u>作为潜在的路由器或默认路由器</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>5</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip tunnel show</span></b>，列出隧道</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>没有参数</span></p>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>12</span></b><b><span style='font-family:
"Microsoft YaHei"'>、<span lang=EN-US>ip monitor and rtmon---</span>状态监控</span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>IP</span><span
style='font-family:"Microsoft YaHei"'>实用程序可以连续地监视设备、地址和路由的状态。此选项的格式略有不同。也就是说，监视器<span
lang=EN-US>command</span>是命令行中的第一个命令，然后对象列表如下：</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>ip  monitor  [ all | </span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>LISTofOBJECTS<b> ]</b></span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><u><span
lang=EN-US style='font-family:"Microsoft YaHei"'>OBJECT-LIST</span></u><span
style='font-family:"Microsoft YaHei"'>是我们要监视的对象类型的列表。它可能包含链接、地址和路由。如果没有提供文件参数，则<span
lang=EN-US>IP</span>将打开<span lang=EN-US>RTNETLINK</span>，侦听该参数，并以前面部分描述的格式转储状态更改。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>如果给定文件名，则不会侦听<span lang=EN-US>RTNETLINK</span>，而是打开包含以二进制格式保存的<span
lang=EN-US>RTNETLINK</span>消息的文件，并将其转储。可以使用<span lang=EN-US>rtmon</span>实用程序生成这样的历史文件。此实用程序具有类似于<span
lang=EN-US>IP</span>监视器的命令行语法。理想情况下，应该在发出第一个网络配置命令之前启动<span lang=EN-US>rtmon</span>。例如，如果你在一个启动脚本中插入：</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>rtmon file /var/log/rtmon.log</span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>稍后您将能够查看完整的历史记录。当然，可以随时启动<span
lang=EN-US>rtmon</span>。它在历史记录的前面加上在启动时转储的状态快照。</span></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>&nbsp;</span></b></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>13</span></b><b><span style='font-family:
"Microsoft YaHei"'>、<span lang=EN-US>ip xfrm---</span>设置<span lang=EN-US>xfrm</span></span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>xfrm</span><span
style='font-family:"Microsoft YaHei"'>是一个<span lang=EN-US>IP</span>框架，它可以转换数据报的格式，即用某种算法对数据包进行加密。<span
lang=EN-US>xfrm</span>策略和<span lang=EN-US>xfrm</span>状态通过模板<span lang=EN-US>tmpl_list</span>相关联。该框架被用作<span
lang=EN-US>IPsec</span>协议的一部分。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>1</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip xfrm state add</span></b>，增加新的状态</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>2</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip xfrm state update</span></b>，更新已经存在的状态</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>3</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip xfrm state
allocspi</span></b>，分配<span lang=EN-US>SPI</span>数值</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><u><span
lang=EN-US style='font-family:"Microsoft YaHei"'>MODE</span></u><span
style='font-family:"Microsoft YaHei"'>，设置为默认传输，但可以设置为<b><span lang=EN-US>tunnel</span></b>，<b><span
lang=EN-US>ro</span></b>或者<b><span lang=EN-US>beet</span></b>。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><u><span
lang=EN-US style='font-family:"Microsoft YaHei"'>FLAG-LIST</span></u><span
style='font-family:"Microsoft YaHei"'>，包含一个或多个标志。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><u><span
lang=EN-US style='font-family:"Microsoft YaHei"'>FLAG</span></u><span
style='font-family:"Microsoft YaHei"'>，可以设置为<b><span lang=EN-US>noecn</span></b>、<b><span
lang=EN-US>decap-dscp</span></b>、<b><span lang=EN-US>wildrecv</span></b></span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><u><span
lang=EN-US style='font-family:"Microsoft YaHei"'>ENCAP</span></u><span
style='font-family:"Microsoft YaHei"'>，封装设置为封装类型<u><span lang=EN-US>ENCAP-TYPE</span></u>、源端口<u><span
lang=EN-US>SPORT</span></u>、目标端口<u><span lang=EN-US>DPORT</span></u>和<u><span
lang=EN-US>OADDR</span></u>。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><u><span
lang=EN-US style='font-family:"Microsoft YaHei"'>ENCAP-TYPE</span></u><span
style='font-family:"Microsoft YaHei"'>，可以是<b><span lang=EN-US>espinudp</span></b>或者<b><span
lang=EN-US>espinudp-nonike</span>。</b></span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><u><span
lang=EN-US style='font-family:"Microsoft YaHei"'>ALGO-LIST</span></u><span
style='font-family:"Microsoft YaHei"'>，包含一个或多个算法<span lang=EN-US>Algo</span>，该算法依赖于<span
lang=EN-US>Algo_type</span>设置的算法类型。它可以使用这些算法<b><span lang=EN-US>enc</span></b>、<b><span
lang=EN-US>auth</span></b>、<b><span lang=EN-US>comp</span></b>。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>4</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip xfrm policy add</span></b>，增加新策略</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>5</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip xfrm policy update</span></b>，更新已经存在的策略</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>6</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip xfrm policy delete</span></b>，删除存在的策略</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>7</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip xfrm policy get</span></b>，过去存在的策略</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>8</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip xfrm policy deleteall</span></b>，删除所有的<span
lang=EN-US>xfrm</span>策略</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>9</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip xfrm policy list</span></b>，打印策略列表</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>10</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip xfrm policy flush</span></b>，舒心策略</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>dir</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>DIR</u></span><span
style='font-family:"Microsoft YaHei"'>，目录可以是<b><span lang=EN-US>inp</span></b>、<b><span
lang=EN-US>out</span></b>、<b><span lang=EN-US>fwd</span></b></span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><u><span
lang=EN-US style='font-family:"Microsoft YaHei"'>SELECTOR</span></u><span
style='font-family:"Microsoft YaHei"'>，选择将设置策略的地址。选择器由源地址和目标地址定义。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><u><span
lang=EN-US style='font-family:"Microsoft YaHei"'>UPSPEC</span></u><span
style='font-family:"Microsoft YaHei"'>，由源端口<b><span lang=EN-US>sport</span></b>、目的端口<b><span
lang=EN-US>dport</span></b>、<b><span lang=EN-US>type</span></b>和<b><span
lang=EN-US>code</span></b>定义。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>dev</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>DEV</u></span><span
style='font-family:"Microsoft YaHei"'>，指定网络设备。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>index</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>INDEX</u></span><span
style='font-family:"Microsoft YaHei"'>，索引策略的数量。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>ptype</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>PTYPE</u></span><span
style='font-family:"Microsoft YaHei"'>，默认是<b><span lang=EN-US>main</span></b>，可以切换为<b><span
lang=EN-US>sub</span></b>。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>action</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>ACTION</u></span><span
style='font-family:"Microsoft YaHei"'>，默认是<b><span lang=EN-US>allow</span></b>，可以切换为<b><span
lang=EN-US>block</span></b>。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>priority</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>PRIORITY</u></span><span
style='font-family:"Microsoft YaHei"'>，级别是一个数字，默认<span lang=EN-US>0</span>。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><u><span
lang=EN-US style='font-family:"Microsoft YaHei"'>LIMIT-LIST</span></u><span
style='font-family:"Microsoft YaHei"'>，限制以秒、字节或数据包数量为单位设置。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><u><span
lang=EN-US style='font-family:"Microsoft YaHei"'>TMPL-LIST</span></u><span
style='font-family:"Microsoft YaHei"'>，模板列表基于<b><span lang=EN-US>ID</span></b>、<b><span
lang=EN-US>mode</span></b>、<b><span lang=EN-US>reqid</span></b>、<b><span
lang=EN-US>level</span>。</b></span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><u><span
lang=EN-US style='font-family:"Microsoft YaHei"'>ID</span></u><span
style='font-family:"Microsoft YaHei"'>，由源地址、目标地址、<span lang=EN-US>proto</span>和<span
lang=EN-US>spi</span>的值指定。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><u><span
lang=EN-US style='font-family:"Microsoft YaHei"'>XFRM_PROTO</span></u><span
style='font-family:"Microsoft YaHei"'>，值可以是<b><span lang=EN-US>esp</span></b>、<b><span
lang=EN-US>ah</span></b>、<b><span lang=EN-US>comp</span></b>、<b><span
lang=EN-US>route2</span></b>、<b><span lang=EN-US>hao</span>。</b></span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><u><span
lang=EN-US style='font-family:"Microsoft YaHei"'>MODE</span></u><span
style='font-family:"Microsoft YaHei"'>，默认<b><span lang=EN-US>transport</span></b><span
lang=EN-US>,</span>，还可以是<b><span lang=EN-US>tunnel</span></b>，<b><span
lang=EN-US>beet</span>。</b></span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><u><span
lang=EN-US style='font-family:"Microsoft YaHei"'>LEVEL</span></u><span
style='font-family:"Microsoft YaHei"'>，默认<b><span lang=EN-US>required</span></b>，还可以是<b><span
lang=EN-US>use</span>。</b></span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><u><span
lang=EN-US style='font-family:"Microsoft YaHei"'>UPSPEC</span></u><span
style='font-family:"Microsoft YaHei"'>，由<b><span lang=EN-US>sport</span></b>、<b><span
lang=EN-US>dport</span></b>、<b><span lang=EN-US>type</span></b>、<b><span
lang=EN-US>code</span></b>指定。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>11</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip xfrm monitor</span></b>，用于列出所有对象或定义的对象组。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>xfrm monitor</span></b><span
style='font-family:"Microsoft YaHei"'>可以监视所有对象或其中定义的组的策略。</span></p>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>14</span></b><b><span style='font-family:
"Microsoft YaHei"'>、<span lang=EN-US>ip token</span></span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>IPv 6</span><span
style='font-family:"Microsoft YaHei"'>令牌化接口标识支持用于向节点分配众所周知的主机部分地址，同时仍然从路由器广告获得全局网络前缀。令牌标识符的主要目标是服务器平台，其中的地址通常是手动配置的，而不是使用<span
lang=EN-US>DHCPv 6</span>或<span lang=EN-US>SLAAC</span>。通过使用令牌化标识符，主机仍然可以使用<span
lang=EN-US>SLAAC</span>确定其网络前缀，但如果其网络前缀更改，则更容易自动重新编号<span lang=EN-US>[1]</span>。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>1</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip token set</span></b>，设置接口令牌</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><u><span
lang=EN-US style='font-family:"Microsoft YaHei"'>TOKEN</span></u><span
style='font-family:"Microsoft YaHei"'>，接口标识符令牌地址</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>dev</span></b><span
lang=EN-US style='font-family:"Microsoft YaHei"'> <u>DEV</u></span><span
style='font-family:"Microsoft YaHei"'>，网络接口</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>2</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip token get</span></b>，从内核获取接口令牌</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>显示特定网络设备的令牌化接口标识符。参数：与“<b><span
lang=EN-US>ip token set</span>”</b>的参数一致，但必须省略该令牌。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>3</span><span
style='font-family:"Microsoft YaHei"'>）<b><span lang=EN-US>ip token list</span></b>，列出所有接口令牌</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>列出内核中网络接口的所有令牌化接口标识符</span></p>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>15</span></b><b><span style='font-family:
"Microsoft YaHei"'>、实例</span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>1</span><span
style='font-family:"Microsoft YaHei"'>）显示设备的各种协议地址</span></p>

<table class=a0 border=1 cellspacing=0 cellpadding=0 width="95%"
 style='width:95.0%;margin-left:24.1pt;border-collapse:collapse;border:none'>
 <tr style='height:14.9pt'>
  <td width=836 valign=top style='width:836.15pt;border:solid windowtext 1.0pt;
  background:#E7E6E6;padding:0cm 5.4pt 0cm 5.4pt;height:14.9pt'>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>[root@localhost
  ~]#<b> ip addr show             //</b></span></code><code><b><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>显示设备支持的协议的地址</span></b></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>1: lo:
  &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 16436 qdisc noqueue state UNKNOWN </span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>    link/loopback
  00:00:00:00:00:00 brd 00:00:00:00:00:00</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>    inet
  127.0.0.1/8 scope host lo</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>    inet6 ::1/128
  scope host </span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>       valid_lft
  forever preferred_lft forever</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>2: eth0:
  &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP
  qlen 1000</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>    link/ether
  08:00:27:14:33:57 brd ff:ff:ff:ff:ff:ff</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>    inet
  192.168.1.9/24 brd 192.168.1.255 scope global eth0</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>    inet6
  fe80::a00:27ff:fe14:3357/64 scope link </span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>       valid_lft
  forever preferred_lft forever </span></code></p>
  </td>
 </tr>
</table>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>2</span><span
style='font-family:"Microsoft YaHei"'>）为目标设备添加地址</span></p>

<table class=a0 border=1 cellspacing=0 cellpadding=0 width="95%"
 style='width:95.0%;margin-left:24.1pt;border-collapse:collapse;border:none'>
 <tr style='height:14.9pt'>
  <td width=836 valign=top style='width:836.15pt;border:solid windowtext 1.0pt;
  background:#E7E6E6;padding:0cm 5.4pt 0cm 5.4pt;height:14.9pt'>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>[root@localhost
  ~]# <b>ip addr help              //</b></span></code><code><b><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>查看帮助文档</span></b></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>Usage: ip addr
  {add|change|replace} IFADDR dev STRING [ LIFETIME ]</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>                                                     
  [ CONFFLAG-LIST]</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>       ip addr
  del IFADDR dev STRING</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>       ip addr
  {show|flush} [ dev STRING ] [ scope SCOPE-ID ]</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>                           
  [ to PREFIX ] [ FLAG-LIST ] [ label PATTERN ]</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>&nbsp;</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>[root@localhost
  ~]# <b>ip addr add 192.168.1.110 dev eth0          //</b></span></code><code><b><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>给</span></b></code><code><b><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>eth0</span></b></code><code><b><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>添加新的</span></b></code><code><b><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>ip</span></b></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>&nbsp;</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>[root@localhost
  ~]# <b>ip addr show dev eth0                         //</b></span></code><code><b><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>查看</span></b></code><code><b><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>eth0</span></b></code><code><b><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>的地址信息，多了一个</span></b></code><code><b><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>ip</span></b></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>2: eth0:
  &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP
  qlen 1000</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>    link/ether
  08:00:27:14:33:57 brd ff:ff:ff:ff:ff:ff</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>   <b> inet
  192.168.1.9/24 brd 192.168.1.255 scope global eth0</b></span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>    <b>inet
  192.168.1.110/32 scope global eth0</b></span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>    inet6
  fe80::a00:27ff:fe14:3357/64 scope link </span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>       valid_lft
  forever preferred_lft forever </span></code></p>
  </td>
 </tr>
</table>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal align=center style='text-align:center;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>Copyright@david 
zhytwj2018@163.com</span></p>

</div>

</body>

</html>
